home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 21
/
CU Amiga Magazine's Super CD-ROM 21 (1998)(EMAP Images)(GB)[!][issue 1998-04].iso
/
CUCD
/
Programming
/
AsyncIO
/
src
/
async.h
next >
Wrap
C/C++ Source or Header
|
1997-02-19
|
2KB
|
90 lines
#include <exec/types.h>
#include <exec/memory.h>
#include <dos/dos.h>
#include <dos/dosextens.h>
#include <clib/asyncio_protos.h>
#include <clib/exec_protos.h>
#include <clib/dos_protos.h>
#include <pragmas/exec_sysbase_pragmas.h>
#include <pragmas/dos_pragmas.h>
#include <string.h>
/*****************************************************************************/
#ifdef _DCC
#ifdef ASIO_SHARED_LIB
#define _LIBCALL __geta4 _ASM _ARGS
#else
#define _LIBCALL _ASM _ARGS
#endif
#else
#ifdef __GNUC__
#define _LIBCALL
#else /* __SASC__ */
#ifdef ASIO_SHARED_LIB
#define _LIBCALL __saveds _ASM _ARGS
#else
#define _LIBCALL _ASM _ARGS
#endif
#endif /* _ GNUC_ */
#endif /* _DCC */
#define _CALL _ASM _ARGS
/*****************************************************************************/
#ifndef ASIO_NOEXTERNALS
extern struct DosLibrary *DOSBase;
extern struct ExecBase *SysBase;
#endif
#ifdef ASIO_SHARED_LIB
extern struct ExecBase *SysBase;
extern struct Library *UtilityBase;
extern struct DosLibrary *DOSBase;
#endif
/*****************************************************************************/
/* this macro lets us long-align structures on the stack */
#define D_S(type,name) char a_##name[ sizeof( type ) + 3 ]; \
type *name = ( type * ) ( ( LONG ) ( a_##name + 3 ) & ~3 );
#ifndef MIN
#define MIN(a,b) ( ( a ) < ( b ) ? ( a ) : ( b ) )
#endif
/*****************************************************************************/
#ifdef ASIO_NOEXTERNALS
AsyncFile *
AS_OpenAsyncFH( BPTR handle, OpenModes mode, LONG bufferSize, BOOL closeIt, struct ExecBase *SysBase, struct DosLibrary *DOSBase );
#else
AsyncFile *
AS_OpenAsyncFH( BPTR handle, OpenModes mode, LONG bufferSize, BOOL closeIt );
#endif
VOID AS_SendPacket( AsyncFile *file, APTR arg2 );
LONG AS_WaitPacket( AsyncFile *file );
VOID AS_RequeuePacket( AsyncFile *file );
VOID AS_RecordSyncFailure( AsyncFile *file );